package com.tte.common.anno;

import com.tte.common.anno.dateConverAnno.NeedDateFormatConvert;
import com.tte.common.model.vo.UserQueryVO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

/**
 * 本地测试方法
 * @author TTE
 */

@Service
public class TestDateField {

    @NeedDateFormatConvert
    public UserQueryVO convert(String startDate, String endDate){
        UserQueryVO userQueryVO = new UserQueryVO();
        if (StringUtils.isBlank(startDate)) {
            startDate = "2019-09-09 12:36:15";
        }
        if (StringUtils.isBlank(endDate)) {
            endDate  = "2019-11-19 12:36:15";
        }
        userQueryVO.setStartDate(startDate);
        userQueryVO.setEndDate(endDate);
        return userQueryVO;
    }
}